﻿@model PostSlugViewModelWrapper
<hr />
<div class="post-slug-actions clearfix mb-4">
    <div class="float-right">
        <button class="btn btn-round btn-outline-success btn-ratings">
            <span class="icon-heart"></span>
            Like (<span class="likehits-num">@Model.PostModel.Likes</span>)
        </button>

        <button class="btn btn-round btn-outline-secondary" data-toggle="modal" data-target="#qrcode-window">
            <span class="icon-qrcode"></span>
            QR Code
        </button>
    </div>
</div>

<div class="modal fade" id="qrcode-window" tabindex="-1" role="dialog" aria-labelledby="qrcodewindowLabel" aria-hidden="true">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <div class="modal-title" id="qrcodewindowLabel">@Model.PostModel.Title</div>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="text-center">
                    <p class="text-center">
                        Scan QR Code on your phone
                    </p>
                    <div id="post-qrcode">
                    </div>
                </div>
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
            </div>
        </div>
    </div>
</div>

<style>
    .qrcode-scan-phone-container {
        margin: 0 auto;
    }

    .modal-content {
        border-radius: 0;
    }

    #qrcode img {
        margin: 0 auto;
    }
</style>